# 定义函数，获取令牌/请求头
from api.supcon_login_api import Supcon_Login_Api


def get_header():
    jsondata = {"password": "yx87686363", "userName": "admin", "forceLogin": "false"}
    resp = Supcon_Login_Api.login(jsondata)
    header = {"ticket": resp.json().get("ticket")}
    return header


if __name__ == '__main__':
    req = get_header()
    print(req)
